<!--<include file="public+header">-->

<!--{~$sCalendarLang=Core_Extend::calendar()}-->
<script type="text/javascript" src="<!--{:__PUBLIC__}-->/js/calendar/datepicker/WdatePicker.js"></script>

<!--{:Core_Extend::editorInclude()}-->
<!--{:Core_Extend::emotion()}-->

<!--{script}-->
$(function(){
	editor=loadEditorThin('jiajuevent_content');
	$(".face-icon").jqfaceedit({txtAreaObj:editor,containerObj:$('#emotion_parentcontainer'),top:25,left:-27});
});

currentBeforeFun=function(){
	$('#jiajuevent_content').val(editor.html());
};

function insertEventcover(nAttachmentid){
	insertAttachmentthumb('jiajuevent_thumb',nAttachmentid);
}

checkForm(SubmitFormCheckform);
<!--{/script}-->

	<section class="secondary_bar">
		<div class="breadcrumbs_container">
			<article class="breadcrumbs"><a href="<!--{:Q::U('public/fmain')}-->"><!--<lang package='Template'>-->主页<!--</lang>--></a> <div class="breadcrumb_divider"></div> <a class="current"><!--<if condition="empty( $nId )" >-->添加活动<!--<else/>-->编辑活动<!--</if>--></a></article>
		</div>
	</section>

	<section id="main" class="column">
		<article class="module width_full">
			<header><h3><!--<lang package='Template'>-->操作提示<!--</lang>--></h3></header>
			<div class="module_content">
				<ul>
					<li>温馨提示：封面图片推荐请使用<span style="color:#ED145B;">300*200</span>格式的图片。</li>
				</ul>
			</div>
		</article>

		<article class="module width_full">
			<header><h3 class="tabs_involved"><!--<if condition="empty( $nId )" >-->添加活动<!--<else/>-->编辑活动<!--</if>--></h3>
				<ul class="tabs">
					<li class="active"><a href="<!--{:Q::U('jiajuevent/index')}-->">活动列表</a></li>
				</ul>
			</header>
			<form action="" method="post" id="jiajueventAdd" class="validate">
				<div class="module_content">
					<fieldset>
						<label for="jiajuevent_title">活动标题</label>
						<input type="text" name="jiajuevent_title" id="jiajuevent_title" size="40" value="<!--<if condition="isset( $oValue )">--><!--{$oValue:jiajuevent_title}--><!--</if>-->" class="{required:true,maxlength:100}"/>
						<div class="description input_tips">活动标题不能为空，最多100个字符</div>
						<p class="input_errortips"></p>
					</fieldset>
					<fieldset>
						<label for="jiajuevent_starttime">活动时间</label>
						<input style="width:100px;float:left;" id="jiajuevent_starttime" name="jiajuevent_starttime" type="text" value="<!--{:date('Y-m-d',isset($oValue)?$oValue['jiajuevent_starttime']:CURRENT_TIMESTAMP)}-->" onclick="WdatePicker({el:'jiajuevent_starttime',skin:'ext',lang:'<!--{$sCalendarLang}-->',dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'jiajuevent_endtime\')}'})" class="{required:true}">
						<input style="width:100px;" id="jiajuevent_endtime" name="jiajuevent_endtime" type="text" value="<!--{:date('Y-m-d',isset($oValue)?$oValue['jiajuevent_endtime']:CURRENT_TIMESTAMP+86400*30)}-->" onclick="WdatePicker({el:'jiajuevent_endtime',skin:'ext',lang:'<!--{$sCalendarLang}-->',dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'jiajuevent_starttime\')}'})" class="{required:true}">
						<p class="input_errortips clear"></p>
					</fieldset>
					<fieldset>
						<label for="jiajuevent_thumb">活动缩略图&nbsp;<span class="red" style="cursor:pointer;" onclick="$('#jiajuevent_thumb').val('');">x</span></label>
						<input style="float:left;width:400px;" type="text" id="jiajuevent_thumb" name="jiajuevent_thumb" value="<!--{if isset($oValue)}--><!--{$oValue['jiajuevent_thumb']}--><!--{/if}-->" readonly onmouseover="globalPreviewImg('jiajuevent_thumb');" onmouseout="unglobalPreviewImg('jiajuevent_thumb');" class="{required:true}"/>
						<input type="button" class="alt_btn" onclick="globalAddattachment('insertEventcover',1,1);" value="<!--<lang package='__COMMON_LANG__@Common'>-->媒体<!--</lang>-->">
						<div class="description input_tips clear">从附件管理器中选择</div>
						<p class="input_errortips"></p>
						<div id="jiajuevent_thumb-preview"></div>
					</fieldset>
					<fieldset>
						<label for="jiajuevent_description">活动简介</label>
						<textarea type="text" name="jiajuevent_description" id="jiajuevent_description" class="{maxlength:250}" style="height:70px;"><!--<if condition="isset( $oValue )">--><!--{$oValue:jiajuevent_description}--><!--</if>--></textarea>
						<div class="description">最多250个字</div>
					</fieldset>
					<fieldset>
						<label for="jiajuevent_sort"><!--<lang package='Template'>-->序号<!--</lang>--></label>
						<input type="text" name="jiajuevent_sort" id="jiajuevent_sort" size="40" value="<!--<if condition="isset( $oValue ) && $oValue:jiajuevent_sort">--><!--{$oValue:jiajuevent_sort}--><!--<else/>-->0<!--</if>-->" class="{required:true,digits:true,min:0,max:999}"/>
						<div class="description input_tips">活动序号，用于排列活动顺序</div>
						<p class="input_errortips"></p>
					</fieldset>
					<fieldset>
						<label for="jiajuevent_content">活动内容</label>
						<div id="event-media-box" class="common-media-box">
							<a href="javascript:void(0);" class="face-icon icon_add_face" ><!--<lang package='__COMMON_LANG__@Common'>-->表情<!--</lang>--></a> 
							<a href="javascript:void(0);" onclick="globalAddattachment('insertAttachment_');" class="icon_add_img"><!--<lang package='__COMMON_LANG__@Common'>-->媒体<!--</lang>--></a>
							<a href="javascript:void(0);" onclick="addVideo('insertVideo_');" class="icon_add_video" ><!--<lang package='__COMMON_LANG__@Common'>-->视频<!--</lang>--></a>
							<a href="javascript:void(0);" onclick="addMusic('insertMusic_');" class="icon_add_music"><!--<lang package='__COMMON_LANG__@Common'>-->音乐<!--</lang>--></a>
						</div>
						<div id="emotion_parentcontainer">
							<textarea class="input-xlarge" name="jiajuevent_content" id="jiajuevent_content" style="width:70%;height:<!--{:Core_Extend::getEditor()}-->px;"><!--{if isset($sContent)}--><!--{$sContent|htmlspecialchars}--><!--{/if}--></textarea>
						</div>
						<div class="description">
							1、如果需要拷贝word文字，请先Ctrl+C拷贝内容，然后点击下面工具栏中“从word粘贴”按钮。
							<br>2、如果需要清除格式拷贝，请选择下面工具栏中“清除格式”按钮。
							<br>3、图片必须小于200k，宽度不能超过900px
						</div>
					</fieldset>
				</div>
				<footer>
					<div class="submit_link">
						<input type="hidden" name="ajax" value="1">
						<input type="hidden" name="id" id="id" value="<!--<if condition="isset( $nId )">--><!--{$nId}--><!--</if>-->"/>
						<input type="submit" id="submit_button" value="" class="alt_btn">
						&nbsp;<input type="reset" value="<!--<lang package='Template'>-->重置<!--</lang>-->">
					</div>
				</footer>
			</form>
		</article>

<!--<include file="public+footer">-->